<template>
  <a-float-button
    v-if="props.presentType == 'floatButton'"
    type="primary"
    @click="openModal"
    tooltip="ITTO引用统计"
  >
    <template #icon>
      <BarChartOutlined />
    </template>

    Sub
  </a-float-button>

  <a-button
    size="small"
    v-if="props.presentType == 'button'"
    type="primary"
    @click="openModal"
  >
    <template #icon>
      <BarChartOutlined />
    </template>
    Sub
  </a-button>


<a-modal
    :width="'80%'"
    v-model:open="open"
    title="ITTO 引用统计"
    :maskClosable="false"
  >
  <div style="display: flex">
    <div style="flex: 1 1 auto">
      <IttoStatictisic classify="INPUT"></IttoStatictisic>
    </div>
    <div style="flex: 1 1 auto">
      <IttoStatictisic classify="TOOL"></IttoStatictisic>
    </div>
    <div style="flex: 1 1 auto">
      <IttoStatictisic classify="OUTPUT"></IttoStatictisic>
    </div>
  </div>
</a-modal>
</template>

<script setup>
import pmpHooks from "@/hooks/PmpHooks.js";
import {BarChartOutlined} from "@ant-design/icons-vue";
import { ref } from "vue";
import IttoStatictisic from "@/components/IttoStatictisic.vue";
const list = ref([]);

const props = defineProps({
  presentType: {
    type: String,
    default: "button",
  },
});

async function queryPmpIttoStatictisicList() {
  const res = await pmpHooks.queryPmpIttoStatictisicList("");
  list.value = res.result;
}

const open = ref(false);

function closeModal() {
  open.value = false;
}

function openModal() {
  // console.log('=====', props.id)
  // console.log('=====', data.value)
  open.value = true;
}
</script>

<style>
</style>